package com.smart.stock.module.spider.util;

import java.util.HashMap;
import java.util.Map;

public class RequestUtil {
    public static Map<String, String> string2token(String str){
        Map<String, String> cookie = new HashMap<>();
        String[] kvs = str.split(";");
        for (int i = 0; i < kvs.length; i++) {
            String kv = kvs[i];
            String k = kv.split("=")[0].trim();
            String v = kv.split("=")[1].trim();
            cookie.put(k,v);
        }
        return cookie;
    }
}
